package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@SuppressWarnings("serial")
public class BdServiceAttrPK implements Serializable {

    /** identifier field */
    private Integer servicetype;

    /** identifier field */
    private Integer modeltype;

    /** identifier field */
    private Integer attrid;

    /** full constructor */
    public BdServiceAttrPK(Integer servicetype, Integer modeltype, Integer attrid) {
        this.servicetype = servicetype;
        this.modeltype = modeltype;
        this.attrid = attrid;
    }

    /** default constructor */
    public BdServiceAttrPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="servicetype"
     *                 length="10"
     *             
     */
    public Integer getServicetype() {
        return this.servicetype;
    }

    public void setServicetype(Integer servicetype) {
        this.servicetype = servicetype;
    }

    /** 
     *                @hibernate.property
     *                 column="modeltype"
     *                 length="10"
     *             
     */
    public Integer getModeltype() {
        return this.modeltype;
    }

    public void setModeltype(Integer modeltype) {
        this.modeltype = modeltype;
    }

    /** 
     *                @hibernate.property
     *                 column="attrid"
     *                 length="10"
     *             
     */
    public Integer getAttrid() {
        return this.attrid;
    }

    public void setAttrid(Integer attrid) {
        this.attrid = attrid;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("servicetype", getServicetype())
            .append("modeltype", getModeltype())
            .append("attrid", getAttrid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdServiceAttrPK) ) return false;
        BdServiceAttrPK castOther = (BdServiceAttrPK) other;
        return new EqualsBuilder()
            .append(this.getServicetype(), castOther.getServicetype())
            .append(this.getModeltype(), castOther.getModeltype())
            .append(this.getAttrid(), castOther.getAttrid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getServicetype())
            .append(getModeltype())
            .append(getAttrid())
            .toHashCode();
    }

}
